// this is a reference (uniform of type int1) to the texture unit to use to draw this texture 
// (i.e. if only 1 texture assigned use 0) 
uniform sampler2D theTexture;
uniform sampler2D alphaTexture;


void main() {
	// get the colour from the texture at the interpolated texture coordinate
	vec3	textureColour = vec3(texture2D(theTexture, gl_TexCoord[0].st));
	vec4	alphaColour = vec4(texture2D(alphaTexture, gl_TexCoord[1].st));
		
	// assign the fragment colour to this texture colour
	gl_FragColor = vec4(textureColour, alphaColour.a);
}
